<?php
use app\utils\BaseUtils;
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this \yii\web\View */
/* @var $user \app\models\User */

\app\assets\MuiImageAsset::register($this);

?>
<div class="company-infomation mui-content-padded">

    <div class="title">
        <h4>基本信息</h4>
    </div>
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <?php if($user->getIsVerifyDeny()): ?>
            <tr>
                <th>审核状态：</th>
                <td>
                    <div class="name ui-txt-info">
                        <b style="padding:0 5px;" class="mui-btn-danger mui-btn-outlined">未通过（请重新编辑提交审核）</b>
                        <?= Html::encode($user->remark); ?>
                    </div>
                </td>
            </tr>
        <?php endif; ?>
        <?php if($user->getIsVerify()): ?>
            <tr>
                <th>审核状态：</th>
                <td>
                    <b style="padding:0 5px;" class="mui-btn-success mui-btn-outlined">审核中</b>
                </td>
            </tr>
        <?php endif; ?>
        <tr>
            <th>组织名称：</th>
            <td>
                <div class="name ui-txt-info"><?= Html::encode($user->uname); ?></div>
            </td>
        </tr>
        <tr>
            <th>信用代码：</th>
            <td>
                <div class="ui-txt-info"><?= Html::encode($user->profile->company_code); ?></div>
            </td>
        </tr>
        <tr>
            <th>联系电话：</th>
            <td>
                <div class="ui-txt-info"><?= $user->phone; ?></div>
            </td>
        </tr>
        <tr>
            <th>电子邮箱：</th>
            <td>
                <div class="ui-txt-info"><?= Html::encode($user->profile->email); ?></div>
            </td>
        </tr>
        <tr>
            <th>副本照片：</th>
            <td>
                <?= BaseUtils::arrayToImage($user->profile->getThumbsByFiled('identity_images')); ?>
            </td>
        </tr>
        <tr>
            <th>负 责 人：</th>
            <td>
                <?= BaseUtils::arrayToImage($user->profile->getThumbsByFiled('user_images')); ?>
            </td>
        </tr>
    </table>

    <hr />
    <div class="title">
        <h4>组织简介</h4>
    </div>

    <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
            <th>基本信息：</th>
            <td><?= Html::encode($user->profile->experience1); ?></td>
        </tr>
        <tr>
            <th>组织规模：</th>
            <td><?= Html::encode($user->profile->company_scale); ?></td>
        </tr>
        <tr>
            <th>所属行业：</th>
            <td><?= Html::encode($user->profile->industry); ?></td>
        </tr>
        <tr>
            <th>详情介绍：</th>
            <td><?= Html::encode($user->profile->experience1); ?></td>
        </tr>
        <tr>
            <th>风貌展示：</th>
            <td>
                <?= BaseUtils::arrayToImage($user->profile->getThumbsByFiled('style_images')); ?>
            </td>
        </tr>
        <tr>
            <th>产品展示：</th>
            <td>
                <?= BaseUtils::arrayToImage($user->profile->getThumbsByFiled('product_images')); ?>
            </td>
        </tr>
        <tr>
            <th>官网链接：</th>
            <td>
                <a target="_blank" data-href="<?= Html::encode($user->profile->home_link); ?>"><?= Html::encode($user->profile->home_link); ?></a>
            </td>
        </tr>
    </table>

    <button type="button" data-href="<?= Url::to(['user/profile']); ?>" class="mui-btn mui-btn-blue btn-edit">编辑</button>
</div>


